撤销订单(商户订单号)
商户可以通过该接口发起撤销订单。
请求参数 | 类型 | 描述 |
---|---|---|
base_uri | string | 声明接入点https://apihk.mch.weixin.qq.com/ (香港接入) |
out_trade_no | string | 商户订单号 |
query | object | 声明请求的查询参数 |
sub_mchid | string | 子商户号 |
php
$instance->v3->global->papay->transactions->outTradeNo->_out_trade_no_->reverse->postAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/global/papay/transactions/out-trade-no/{out_trade_no}/reverse')->postAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/global/papay/transactions/out-trade-no/{out_trade_no}/reverse']->postAsync([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->global->papay->transactions->outTradeNo->_out_trade_no_->reverse->post([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/global/papay/transactions/out-trade-no/{out_trade_no}/reverse')->post([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/global/papay/transactions/out-trade-no/{out_trade_no}/reverse']->post([
'base_uri' => 'https://apihk.mch.weixin.qq.com/', // 接入点(香港接入)
'out_trade_no' => '1217752501201407033233368018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r($response->getStatusCode() === 204);
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |
参阅 官方文档